Immunity-aware programming